<style>
    .biaoti {
        /*border-bottom: 1px solid #ccc;*/
        padding: 10px;
        box-sizing: border-box;
        background: #e3eced;
        display: flex;
        align-items: center;
        font-size: 16px;
        color: #666;
        margin-bottom: 20px;
    }

    .biaoti .xian {
        width: 8px;
        height: 20px;
        background: #18bc9c;
        margin-right: 10px;
    }

    .kk {
        width: 49%;
        background: #fff;
    }

    body {
        background: #f2f2f2 !important;
    }

    .is-dialog #main {
        background: #f2f2f2 !important;
    }

    .tabs {
        background: #fff;
        margin-top: 20px;
    }

    .tabs-content {
        display: flex;
        flex-direction: column;
        /*padding-top: 20px;*/
        width: 100%;
        margin: auto;
    }

    .tab-content .tab-labels {
        line-height: 40px;
    }

    .tabs-content > .tab {
        display: none;
    }

    .tabs-content > .tab {
        margin-bottom: 30px;
    }

    .tabs-content > div.active {
        display: block;
    }

    .tabs .col-sm-2 {
        width: 100%;
        text-align: left;
    }

    .tab-labels {
        /*padding: 10px;*/
        box-sizing: border-box;
        background: #e3eced;
        display: flex;
        align-items: center;
        font-size: 14px;
        color: #666;
        margin-bottom: 10px;
    }

    .tab-labels .xian {
        width: 8px;
        height: 20px;
        background: #18bc9c;
        margin-right: 10px;
        margin-left: 10px;
    }

    .tcxm-td td {
        background: #4e73df;
        color: #fff;
        text-align: center;
        border-right: 1px solid;
    }

    .form-inline input {
        width: 100% !important;
    }
    .form-inline select {
        width: 100% !important;
    }

    .form-inline td {
        border-right: 1px solid #e6e6e6;
        border-bottom: 1px solid #e6e6e6;
        text-align: center;
    }

    .tab-label {
        width: 100px;
        text-align: center;
        cursor: pointer;
        height: 30px;
        line-height: 30px;
        border-radius: 4px;
        margin-left: 40px;
        margin-bottom: 0;
    }

    .tab-label:nth-child(1) {
        margin-left: 10px;
    }

    .tab-label.active {
        background: #4e73df;
        color: #fff;
    }
    input{
        background-color: #fff!important;
    }
    select{
        background-color: #fff!important;
    }
    textarea{
        background-color: #fff!important;
    }
    .tab-top-label{
        height: 40px;
        line-height: 40px;
    }
</style>
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div style="display: flex;width:100%;justify-content: space-between">
        <div class="kk">
            <div class="biaoti">
                <div class="xian"></div>
                车主信息
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Car_num')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-car_owner" class="form-control" name="row[car_num]" type="text" value="{$res.car_num}" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Phone')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-car_card" class="form-control" name="row[phone]" type="text" value="{$res.phone}" readonly>
                </div>
            </div>
        </div>
    </div>
    <div class="tabs">
        <div class="tabs-content">
            <div id="tab1" class="tab active">
                <div class="tab-labels">
                    <div class="xian"></div>
                    信息列表
                </div>
               {if $res['is_add'] == 1}
                <div class="form-group zhanshi">
                    <label class="control-label col-xs-12 col-sm-2"></label>
                    <div class="col-xs-12 ">
                        <button class="tab-label2 btn btn-primary btn-embossed style1" type="button" style="margin-left: 10px;background-color: #1b4fe7" onclick="AddRow()">增加渠道催办</button>
                        <button class="tab-label2 btn btn-primary btn-embossed style1" type="button" style="margin-left: 10px;background-color: #1b4fe7" onclick="AddRow2()">增加舆情处理</button>
                    </div>
                </div>
                {/if}
                <div class="form-group" style="margin-bottom: 0">
                    <div class="col-xs-12">
                        <table class="table fieldlist" data-template="basictpl" data-name="res[basic]"
                               id="first-table1">
                            <tr class="tcxm-td">
                                <td>{:__('录入时间')}</td>
                                <td>{:__('录入人')}</td>
                                <td >{:__('类别')}</td>
                                <td>{:__('来电人类型')}</td>
                                <td>{:__('来电人名称')}</td>
                                <td>{:__('来电手机号')}</td>
                                <td>{:__('车型')}</td>
                                <td>{:__('备注')}</td>
                                <td>{:__('查勘人')}</td>
                                <td>{:__('查勘人回复时间')}</td>
                                <td>{:__('查勘人回复内容')}</td>
                                <td>{:__('查勘人回复图片')}</td>
                                <td>{:__('渠道催办内容')}</td>
                                <td>{:__('渠道催办图片')}</td>
                                <td>{:__('操作')}</td>
                            </tr>
                            {volist name="row" id="vo"}
                            <tr class="form-inline">
                                <td class="idd" style="display: none"><input type="hidden" name="row[id]" value="{$vo.id}"></td>
                                <td class="tt" id="date_{$vo.id}">{$vo.date}
                                <td class="name">{$vo.user_name}
                                </td>
                                <td class="type" id="type_{$vo.id}">
                                    {$vo.type_name}
                                </td>

                                <td id="ld_type_{$vo.id}">
                                    {if $vo['type'] != 10}
                                        {$vo.ld_type}
                                    {/if}
                                </td>
                                <td id="name_{$vo.id}">{$vo.name}</td>
                                <td id="phone_{$vo.id}">{$vo.phone}</td>
                                <td id="chexing_{$vo.id}">{$vo.chexing}</td>
                                <td class="content" id="content_{$vo.id}">{$vo.content}</td>
                                <td id="fenpei_{$vo.id}">{$vo.fenpei_name}</td>
                                <td id="buchang_date_{$vo.id}">{$vo.buchang_date}</td>
                                <td id="buchang_beizhu_{$vo.id}" class="content">{$vo.buchang_beizhu}</td>
                                <td id="buchang_img_{$vo.id}">
                                    {volist name="vo.buchang_img" id="vo1"}
                                    <img src="{$vo1}"  data-magnify="gallery" data-src="{$vo1}" style="max-width: 100px;">
                                    {/volist}
                                </td>
                                <td id="cuiban_beizhu_{$vo.id}" class="content">{$vo.cuiban_beizhu}</td>
                                <td id="cuiban_img_{$vo.id}">
                                    {volist name="vo.cuiban_img" id="vo1"}
                                    <img src="{$vo1}"  data-magnify="gallery" data-src="{$vo1}" style="max-width: 100px;">
                                    {/volist}
                                </td>
                                <td class="caozuo">
                                    {if $vo['is_ben'] == 1}
                                    <input class="save" type="button"  value="回复" style="width:50px!important;height:30px;border: none;background:#3683D3 !important;color: #fff;" onclick="AddRow1({$vo.id})">
                                    {/if}
                                </td>
                            </tr>
                            {/volist}

                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>
<script src="/assets/js/ace1.4/assets/js/jquery.min.js" type="text/javascript"></script>
<script>
    //追加信息
    function AddRow(){
        layer.open({
            type: 2,
            title: '添加记录',
            maxmin: true,
            area: ['90%', '800px'],
            content: "{:url('baoan/beizhu/tan')}?id=" + {$res.id}+"&type=10"
        });
    }

    //追加信息
    function AddRow2(){
        layer.open({
            type: 2,
            title: '添加记录',
            maxmin: true,
            area: ['90%', '800px'],
            content: "{:url('baoan/beizhu/tan')}?id=" + {$res.id}+"&type=11"
        });
    }
    //回复
    function AddRow1(id){
        layer.open({
            type: 2,
            title: '回复信息',
            maxmin: true,
            area: ['90%', '800px'],
            content: "{:url('baoan/beizhu/huifu_tan')}?id=" + id
        });
    }
</script>
